package com.yq.cp.utils;

import lombok.extern.log4j.Log4j2;

@Log4j2
public class BeanUtil {

    public static <T> T copy(Object src, Class<T> clz) {
        String json = JsonUtil.builder().toJson(src);
        log.info("Parse object to json -> {}", json);
        T result = JsonUtil.builder().fromJson(json, clz);
        log.info("Parse object to entity -> {}", result);
        return result;
    }

}
